A modern computer system often contains many different types of devices. A device is a physical component within the computer system. Sometimes, it is also referred to as a “physical device” for clarity, to indicate that the component exists in the real world. For example, monitors, mice, printers, disk drives, processors, hard drives, and graphic cards are different types of physical devices. In other words, devices are the “hardware” of the computer system.
Some types of devices, such as processors, memory cards, or graphic cards, contain memory within themselves. In general, memory refers to the internal storage areas within the computer system, where data are stored. Conceptually, there are two main categories of memory: physical memory and virtual memory. Physical memory refers to storage areas contained within the physical devices, such as memory chips, that are capable of holding data. In contrast, virtual memory refers to imaginary memory areas supported by the operating system in conjunction with the hardware in the computer system for enlarging the amount of memory software programs can use. Furthermore, virtual memory offers access protection, multiple virtual locations of a single physical copy, and provides the appearance that a larger memory space exists.
All memory within a computer system is collectively referred to as a “memory space.” All physical memory within the computer system is collectively referred to as a physical memory space. All virtual memory within the computer system is collectively referred to as a virtual memory space.
On the physical side, devices that contain physical memory typically are associated with some types of memory chips, such as random-access memory (RAM). Data may be both read from and written into RAM. Traditionally, a device has one or more memory “slots” that the memory chips can connect to. Some newer types of devices do not require the memory chips to be in actual physical contact with the memory slots.
Although a device may contain multiple memory slots, not all of the available memory slots are necessarily populated with the memory chips. This may be due to various reasons, such as cost concerns, memory chips availability, device architecture, etc. For example, assume a device may contain sufficient number of memory slots such that at a maximum, the device may contain 1,024 megabytes (1 megabyte=1,048,576 bytes) of physical memory. It is possible that the slots for all 1,024 megabytes of memory are populated with the memory chips.
However, it is equally possible that only a portion of the slots for the 1,024 megabytes of memory, for example, 512 megabytes or 768 megabytes, is actually populated with the memory chips, and the rest are empty.
Assume a computer system contains five of the devices described above, where each device may possibly contain up to 1,024 megabytes of physical memory. However, only the first 768 megabytes within each device are actually populated with the memory chips, and the remaining 256 megabytes are empty. These five devices are then lined up side by side. Thus, the physical memory space of this computer system contains five contiguous segments of physical memory of 768 megabytes each, separated by five empty gaps, or “holes,” of 256 megabytes each.
The above example is over-simplified to illustrate the concept of gaps or holes in a physical memory space. Computer systems have advanced significantly over the years. They grow in size and complexity: multi-processors, multi-tier architectures, distributed systems, etc. Modern computer systems may contain thousands of different types of devices, many of which contain various amounts of physical memory.
Extending the above example to a grand scale, assume instead of five devices that contain memory, the computer system in the above example actually contains 5,000 or 50,000 such devices. The physical memory space of this system contains thousands or tens of thousands of segments of memory separated by gaps or holes. Further, a single device may contain multiple segments of memory, separated by gaps. For example, the device described above may contain a 256-megabyte memory segment, followed by a 128-megabyte gap, followed by another 512-megabyte memory segment, and finally followed by another 128-megabyte gap. The result is a significant increase the number of gaps or holes in the physical memory space.